﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace Entity
{
    public class Document
    {
        #region[Public Properties]

        public string Id { get; set; }
        public string Name { get; set; }
        public string Code { get; set; }
        public string CreateDate { get; set; }
        public string EffectiveDate { get; set; }
        public string Info { get; set; }
        public string File { get; set; }
        public string Priority { get; set; }
        public string Active { get; set; }
        public string TypeId { get; set; }
        public string Lang { get; set; }
        #endregion
        #region[DocumentIDataReader]
        public  static Document DocumentIDataReader(IDataReader dr)
        {
            var obj = new Document
                          {
                              Id=Convert.ToString(dr["Id"]),
                              Code = Convert.ToString(dr["Code"]),
                              Name = Convert.ToString(dr["Name"]),
                              CreateDate = Convert.ToString(dr["CreateDate"]),
                              EffectiveDate = Convert.ToString(dr["EffectiveDate"]),
                              Info = Convert.ToString(dr["Info"]),
                              File=Convert.ToString(dr["File"]),
                              Priority = Convert.ToString(dr["Priority"]),
                              Active = Convert.ToString(dr["Active"]),
                              TypeId = Convert.ToString(dr["TypeID"]),
                              Lang=Convert.ToString(dr["Lang"])
                          };
            return obj;
        }
        #endregion
    }
}
